<template>
    <div class="version-tips">
        <div class="box" v-for="(vers, index) in versionTips" :key="index">
            <t :id="`v${vers.version}`">v{{ vers.version }} 版本</t>
            <p>更新时间：{{ vers.time || '' }}</p>
            <li class="t-text" v-for="(d, i) in vers.tips" :key="i">
                {{ d }} <span class="s-code">@bearsee</span>
            </li>
        </div>
        <el-backtop target=".main-container"></el-backtop>
    </div>
</template>

<script>
import { useStore } from 'vuex';
import { onMounted } from 'vue';
import { versionTips } from '../../package.json';

export default {
    name: 'VersionTips',
    setup() {
        const store = useStore();
        onMounted(() => { store.commit('updateArticleTree'); });

        return {
            versionTips,
        };
    },
};
</script>

<style lang="scss">

.version-tips {
  .box {
    padding: 15px 0;
  }
  h3 > span {
    font-size: 14px;
  }
  .t-text {
    font-size: 14px;
  }
}
</style>
